<template>
	<view class="content">
		<view class="form">
			<view class="titel">
				申请信息
			</view>
			<view class="itembox" v-if="info.type">
				<view class="name">
					报销类型:
				</view>
				<view class="inputBox">
					<input type="number" disabled="" v-model="info.type" placeholder="请填写报销类型" />
				</view>
			</view>
			<view class="itembox" v-if="info.imburseDate">
				<view class="name">
					报销申请日期:
				</view>
				<view class="inputBox">
					<input type="number" disabled="" v-model="info.imburseDate" placeholder="请填写报销申请日期" />
				</view>
			</view>
			<view class="itembox" v-if="info.qkrmc">
				<view class="name">
					请款人名称:
				</view>
				<view class="inputBox">
					<input type="number" disabled="" v-model="info.qkrmc" placeholder="请输入请款人名称" />
				</view>
			</view>
			<view class="itembox" v-if="info.imburseMoney">
				<view class="name">
					报销金额:
				</view>
				<view class="inputBox">
					<input type="number" disabled="" v-model="info.imburseMoney" placeholder="请填写报销金额" />
				</view>
			</view>
			<view class="itembox" v-if="info.qkhj">
				<view class="name">
					请款合计:
				</view>
				<view class="inputBox">
					<input type="number" disabled="" v-model="info.qkhj" placeholder="请输入请款合计" />
				</view>
			</view>
			<view class="itembox" v-if="info.remMoney">
				<view class="name">
					已发放金额:
				</view>
				<view class="inputBox">
					<input type="number" disabled="" v-model="info.remMoney" placeholder="请填写已发放金额" />
				</view>
			</view>
			<view class="itembox" v-if="info.remRemain">
				<view class="name">
					剩余发放金额:
				</view>
				<view class="inputBox">
					<input type="text" disabled="" v-model="info.remRemain" placeholder="请输入剩余发放金额" />
				</view>
			</view>
			<view class="itembox" v-if="info.qkbz">
				<view class="name">
					备注:
				</view>
				<view class="inputBox">
					<input type="text" disabled="" v-model="info.qkbz" placeholder="请输入备注" />
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import * as index from '@/api/index.js'
	export default {
		data() {
			return {
				info: {},
				id: '',
				reimburse_type: [], //报销类型
			};
		},
		onLoad(e) {
			this.id = e.id
			this.dictType()
			this.getInfo()
		},
		methods: {
			getInfo() {
				index.goodsReimbursementId({id:this.id}).then(res=>{
					this.info = res.data
					this.info.type = this.$tools.dictDispose(this.reimburse_type,this.info.type)
				})
			},
			dictType() {
				index.typesBatch({
					'reimburse_type': 'reimburse_type',
				}).then(res => {
					this.reimburse_type = res.data.reimburse_type
				})
			}
		}

	}
</script>

<style lang="scss">
	.content {
		padding-left: 20rpx;
		padding-right: 20rpx;
		padding-bottom: 250rpx;

		.bnt {
			color: #ffffff;
			width: 206rpx;
			height: 68rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			border-radius: 10rpx;
			background: #4D8987;
		}

		.form {
			margin-top: 20rpx;
			padding: 20rpx;
			background-color: #ffffff;
			border-radius: 10rpx;

			.titel {
				padding-top: 30rpx;
				padding-bottom: 30rpx;
				color: #333;
				font-size: 28rpx;
				font-weight: bold;
			}

			.itembox {
				border-top: 1px solid #EDEDED;
				display: flex;
				align-items: center;
				padding-top: 30rpx;
				padding-bottom: 30rpx;

				.name {
					text-align: right;
					width: 160rpx;
					color: #999;
					font-size: 28rpx;
				}

				.inputBox {
					padding-left: 20rpx;
					width: 600rpx;
					color: #333;
					font-size: 28rpx;
				}
			}
		}

		.bottom-box {
			position: fixed;
			bottom: 0;
			left: 0;
			width: 750rpx;
			padding: 30rpx;
			padding-bottom: 120rpx;
			height: 120rpx;
			background: #ffffff;
			display: flex;
			justify-content: center;

			.bnt {
				color: #ffffff;
				width: 306rpx;
				height: 88rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				border-radius: 10rpx;
				background: #4D8987;
			}
		}
	}

	.add-worker-btn {
		margin-top: 20rpx;
		padding: 20rpx;
		background-color: #f0f0f0;
		border-radius: 10rpx;
		text-align: center;
		color: #333;
		font-size: 28rpx;
	}
</style>